var mongoose = require('mongoose');

//资源共享表(resourceOnlineDraft)

var resourceOnlineDraftSchema = new mongoose.Schema({
  articleId: {
    type: mongoose.SchemaTypes.ObjectId,
    required: true
  }, //文章id
  resourcename: {
    type: String,
    required: true
  }, //资源共享标题
  content: {
    type: String,
    required: true
  }, //富文本内容
  userid: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'user_login',
    required: true
  }, //用户id
  classify: {
    type: String
  }, //资源类型
  fileList: {
    type: Array,
    default: []
  }, //附件列表
  deleImgId: {
    type: Array,
    default: []
  }, //需要删除的图片
  fileDelectArr: {
    type: Array,
    default: []
  }, //附件删除
})

module.exports = mongoose.model('resourceOnlineDraft', resourceOnlineDraftSchema)